<!DOCTYPE html>

<html lang="zh-cn">

<head>
    <meta charset="utf-8">
    <title>04 LineTest</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
</head>

<body>
    <script src="../dist/xtype-svg.js"></script>
    <script>
        var dom = XType.SVG.create({
            xtype: 'svg',
            parent: document.body,
            attr: {
                width: 400,
                height: 400,
                viewBox: '0 0 100 100'
            },
            children: [{
                xtype: 'line',
                attr: {
                    x1: 0,
                    y1: 80,
                    x2: 100,
                    y2: 20,
                    stroke: '#f00',
                    'stroke-width': 2
                }
            }]
        });

        dom.render();
    </script>
</body>

</html>